#region Using References

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Beaker.OpenCube.CubeManager.Model.Framework;
using Beaker.OpenCube.CubeManager.Model.Interfaces;

#endregion

namespace Beaker.OpenCube.CubeManager.Model.Repositories
{
	public abstract class Repository<TEntity>
		: IRepository<TEntity>
		where TEntity : Entity
	{
		private readonly CubeManagerUnitOfWork _unitOfWork;

		protected Repository( CubeManagerUnitOfWork unitOfWork )
		{
			_unitOfWork = unitOfWork;
		}

		/// <summary>
		/// Gets the unit of work this repository belongs to.
		/// </summary>
		IUnitOfWork IRepository.UnitOfWork
		{
			get { return _unitOfWork; }
		}

		/// <summary>
		/// Gets the unit of work this repository belongs to.
		/// </summary>
		public CubeManagerUnitOfWork UnitOfWork
		{
			get { return _unitOfWork; }
		}
	}
}